/*
 * @Author: liuzibin
 * @Date: 2023-07-24 23:30:17
 * @Descroption: 设置用户余额
 */
const axios = require("axios");

async function setUserBalance({ userId, addMoney }) {
  const response = await axios.post(
    `https://borderclear.cn/sys/change_now_money/${userId}`,
    {
      now_money: addMoney,
      type: 1,
    },
    {
      headers: {
        Accept: "application/json, text/plain, */*",
        Referer: "http://borderclear.cn/admin/merchant/list",
        "User-Agent":
          "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "Content-Type": "application/json;charset=UTF-8",
      },
    }
  );
  return true;
}

module.exports = setUserBalance;
